package com.yl.project.lvyou.replies.service.impl;

import java.util.List;
import com.yl.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yl.project.lvyou.replies.mapper.ScenicCommentRepliesMapper;
import com.yl.project.lvyou.replies.domain.ScenicCommentReplies;
import com.yl.project.lvyou.replies.service.IScenicCommentRepliesService;
import com.yl.common.utils.text.Convert;
import com.yl.framework.config.BaseService;

/**
 * 评论回复Service业务层处理
 * 
 * @author yl
 * @date 2025-03-14
 */
@Service
public class ScenicCommentRepliesServiceImpl extends BaseService<ScenicCommentReplies> implements IScenicCommentRepliesService 
{
    @Autowired
    private ScenicCommentRepliesMapper scenicCommentRepliesMapper;

    /**
     * 查询评论回复
     * 
     * @param id 评论回复ID
     * @return 评论回复
     */
    @Override
    public ScenicCommentReplies selectScenicCommentRepliesById(Long id)
    {
        return scenicCommentRepliesMapper.selectScenicCommentRepliesById(id);
    }

    /**
     * 查询评论回复列表
     * 
     * @param scenicCommentReplies 评论回复
     * @return 评论回复
     */
    @Override
    public List<ScenicCommentReplies> selectScenicCommentRepliesList(ScenicCommentReplies scenicCommentReplies)
    {
        return scenicCommentRepliesMapper.selectScenicCommentRepliesList(scenicCommentReplies);
    }

    /**
     * 新增评论回复
     * 
     * @param scenicCommentReplies 评论回复
     * @return 结果
     */
    @Override
    public int insertScenicCommentReplies(ScenicCommentReplies scenicCommentReplies)
    {
        scenicCommentReplies.setCreateTime(DateUtils.getNowDate());
        return scenicCommentRepliesMapper.insertScenicCommentReplies(scenicCommentReplies);
    }

    /**
     * 修改评论回复
     * 
     * @param scenicCommentReplies 评论回复
     * @return 结果
     */
    @Override
    public int updateScenicCommentReplies(ScenicCommentReplies scenicCommentReplies)
    {
        scenicCommentReplies.setUpdateTime(DateUtils.getNowDate());
        return scenicCommentRepliesMapper.updateScenicCommentReplies(scenicCommentReplies);
    }

    /**
     * 删除评论回复对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteScenicCommentRepliesByIds(String ids)
    {
        return scenicCommentRepliesMapper.deleteScenicCommentRepliesByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除评论回复信息
     * 
     * @param id 评论回复ID
     * @return 结果
     */
    @Override
    public int deleteScenicCommentRepliesById(Long id)
    {
        return scenicCommentRepliesMapper.deleteScenicCommentRepliesById(id);
    }

    @Override
    public List<ScenicCommentReplies> selectScenicCommentRepliesListApp(ScenicCommentReplies scenicCommentReplies) {
        return scenicCommentRepliesMapper.selectScenicCommentRepliesListApp(scenicCommentReplies);
    }
}
